<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<script>
    function People(name, age) {
        this.name = name
        this.age = age
        this.walk = function () {
            console.log("I am walking")
        }
    }

    People.prototype.show = function () {
        console.log(this.name)
    }

    let p = new People('张三', 20)
    console.log(p)
    console.log(p.__proto__.constructor)
    console.log(p.__proto__ === p.prototype)
</script>
</body>

</html>
